package com.lancoo.rxretrofitlibrary.http.parser;

import okhttp3.HttpUrl;

/**
 * Created by tangminglong on 17/8/4.
 */

public class DefaultUrlParser implements UrlParser {
    @Override
    public HttpUrl parseUrl(HttpUrl domainUrl, HttpUrl url) {
        if (null == domainUrl) return  url;

        return url.newBuilder()
                .scheme(domainUrl.scheme())
                .host(domainUrl.host())
                .port(domainUrl.port())
                .build();
    }
}
